package com.eralink.readerfinderlib;

public enum EraLinkReaderFinderApiError {
    Err_no_error(0x00),
    Err_unknown,
    Err_bad_arg,
    Err_not_opened,
    Err_yet_opened,
    Err_open_failed,
    Err_io_failed,
    Err_interrupted,
    Err_timeout,
    Err_need_retry,
    Err_request_failed,
    Err_bad_response,
    Err_bad_report,
    Err_wait_no_response,
    Err_insufficient_input_buffer;

    private final int value;

    EraLinkReaderFinderApiError() {
        this(Counter.nextValue);
        Counter.nextValue += 1;
    }

    EraLinkReaderFinderApiError(int value) {
        this.value = value;
        Counter.nextValue = value + 1;
    }

    public int getValue() {
        return this.value;
    }

    private static class Counter {
        private static int nextValue = 0;
    }
}
